package com.oracle.oa.biz.impl;

import java.util.List;

import com.oracle.oa.biz.MessageBiz;
import com.oracle.oa.dao.MessageDao;
import com.oracle.oa.dao.impl.MessageDaoImpl;
import com.oracle.oa.entity.Message;
import com.oracle.oa.entity.Messagetouser;

public class MessageBizImpl extends BaseBizImpl implements MessageBiz {

	MessageDao mdao;
	
	
	public List<Message> getByRecordtime(String begintime, String endtime) {
		return mdao.getByRecordtime(begintime, endtime);
	}

	
	public int getByTouserAndIfpublish(Object user, Object ifpublish) {
		int count=0;
		List<Message> list = mdao.getByTouserAndIfpublish(user, ifpublish);
		if(list!=null&&list.size()>0){
			count=list.size();
		}
 		return count;
	}

	public MessageDao getMdao() {
		return mdao;
	}

	public void setMdao(MessageDao mdao) {
		this.mdao = mdao;
	}

	
	public List<Message> getByRecordtimeAndDepart(Object depart,
			String begintime, String endtime) {
		return mdao.getByRecordtimeAndDepart(depart, begintime, endtime);
	}

	
	public List<Message> getByRecordtimeAndUser(Object user, String begintime,
			String endtime) {
		return mdao.getByRecordtimeAndUser(user, begintime, endtime);
	}

	
}
